package cn.jsj.finance.bank;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 时间段现金账资金情况查看
 * @author LI
 *
 */
 public class TimeCashFinanceLook extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
	 public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// 调试信息
		 cn.jsj.utils.SysLogger.PrintInfo("时间段现金账资金查看");

		 //获取参数：时间段
		 String startTime=request.getParameter("cashStartTime").trim();
		 String endTime=request.getParameter("cashEndTime").trim();

		 // 调试信息
		 cn.jsj.utils.SysLogger.PrintInfo("时间段为--------->"+startTime+"   "+endTime);

		 //新建参数类
		 cn.jsj.bgtodb.SomeTimeMoneyProperty stmp=new cn.jsj.bgtodb.SomeTimeMoneyProperty();
		 stmp.setEndTime(cn.jsj.utils.TimeDispose.transferDate(endTime));
		 stmp.setStartTime(cn.jsj.utils.TimeDispose.transferDate(startTime));

		 //现金账查看
		 cn.jsj.dao.TblCashAccountDAO tcda=new cn.jsj.dao.TblCashAccountDAO();
		 String result=tcda.getTimeCashMoney(stmp);

		 // 调试信息
		 cn.jsj.utils.SysLogger.PrintInfo("-------"+result);

		 //输出流
		 java.io.PrintWriter out=response.getWriter();
		 out.println("{message:'"+result+"'}");
		 out.flush();
		 out.close();
	}
}